Skip to content

fix: remove redundant minimum payable amount from Sell Appliance modal#1373

Open
Zhey-on wants to merge 1 commit intoEnAccess:mainfrom
Zhey-on:fix/remove-minimum-payable-amount
Open

fix: remove redundant minimum payable amount from Sell Appliance modal#1373
Zhey-on wants to merge 1 commit intoEnAccess:mainfrom
Zhey-on:fix/remove-minimum-payable-amount

Conversation

@Zhey-on
Copy link
Copy Markdown

@Zhey-on Zhey-on commented Mar 13, 2026

Summary

This removes the read-only Minimum Payable Amount field from the cost-based Sell Appliance modal.

Why this should be removed

I traced the field through the current modal, the deferred-payment flow, and the backend payment validation.

In the active Sell Appliance modal, Minimum Payable Amount is not a separate input and it does not represent a second business rule. It is derived directly from the installment amount the user already entered.

On the backend, the real minimum accepted payment for this flow already comes from the installment schedule itself: deferred appliance payments are rejected when the payment amount is below one installment. Because of that, showing both Rate Cost and Minimum Payable Amount in this modal makes the UI look like there are two different values to configure, when in practice there is only one.

That extra field adds noise, creates avoidable confusion, and does not help the operator make a better decision.

What changed

  • removed the read-only Minimum Payable Amount field from the cost-based Sell Appliance view
  • removed the unused minimumPayableAmount state from the active modal
  • simplified the rate count calculation so it works directly from the installment amount
  • fixed the down-payment recalculation path to reset applianceService.appliance.rateCost instead of a stray this.rateCost

Scope

I kept this PR intentionally narrow.

I did not touch the older SellApplianceCard flow in this change. That legacy SHS and tariff path still uses the same concept historically when creating a tariff, and folding that into this PR would make the review less clear.

Validation

  • checked the updated Vue file with editor diagnostics; no errors reported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant